﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NOAH.CMS.Repository;
using NOAH.CMS.Cache;


public class NewsCategoryController : Controller
{
    public ViewResult _Home()
    {
        List<NewsCategory> cates = new NewsCategoryCacheLayer().GetAll();
        cates = cates.FindAll(p => p.IsOnHomePage == true).OrderBy(p => p.Order).ToList();
        return View(cates);
    }

  
    public ViewResult _Left()
    {
        List<NewsCategory> allCates = new NewsCategoryCacheLayer().GetAll();
        allCates = allCates.FindAll(p => p.ParentId == 0 && p.IsLeft == true).OrderBy(p => p.Order).ToList();
        return View(allCates);
    }

}
